<script type="text/javascript" >
    stFacebookToolbox.load_tooltip();
function coupon_export(){
    window.open('<?php echo get_bloginfo('url');?>/coupon/sales_export.php?campain='+jQuery("#campaign").val()+'&format='+jQuery("#format").val()+'&user=<?php echo $user;?>');
}
</script>
<div class="w100p bgl">
    <div class="w100p bgr p5b">
        <form class="stform" id="stFacebookToolboxForm" action="<?php echo admin_url('/admin.php?page=' . $config['plugin_name'] . '&action=' . $current_action) ?>" method="post" >
            <ul>
                <li>
                    <label><?php _e('Campaign', $config['plugin_name']); ?>:</label>
                    <div class="required">
                        <select name="campaign" id="campaign">
                            <option value="all">All</option>
                            <?php foreach($campaign as $row):?>
                            <option value="<?php echo $row->CouponTemplateID;?>"><?php echo $row->CouponTemplateName;?></option>
                            <?php endforeach;?>
                        </select>
                       
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Report format', $config['plugin_name']); ?>:</label>
                    <div class="required">
                        <select name="format" id="format">
                            <option value="pdf">PDF</option>
                            <option value="html">HTML</option>
                        </select>
                       
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Sort by', $config['plugin_name']); ?>:</label>
                    <div class="required">
                        <select name="sort" id="sort">
                            <option value="date">Date</option>
                            <option value="sales">Sales Value</option>
                        </select>
                       
                    </div>
                    <br clear="both" />
                </li>
                
               <li>
                   <a class="button add-new-h2 anchor" style="margin-left: 206px;" href="javascript:void(0);" onclick="coupon_export();">Report</a>
                </li>

          
            </ul>
           
        </form>
    </div>
</div>
